Skip to content

Instantly share code, notes, and snippets.

@rutcreate
rutcreate / README.md
Last active May 17, 2024 04:11
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository

package:com.coloros.backuprestore
package:com.coloros.phonenoareainquire
package:com.coloros.wirelesssettings
package:com.coloros.gamespace
package:com.coloros.simsettings
package:com.coloros.healthcheck
package:com.coloros.weather.service
package:com.coloros.providers.downloads.ui
package:com.coloros.athena
package:com.coloros.blacklistapp
@EmadAdly
EmadAdly / install-android-sdk-in-ubuntu.md
Last active May 17, 2024 04:08
install JDK and Android SDK on Linux Ubuntu

install openjdk

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
@ruvnet
ruvnet / HLC.md
Last active May 17, 2024 04:06
f763620dbb895ea6410aed952bfa4cf5

Incorporating a Hypergraph Lambda Calculus (HLC) based model as part of a larger mixture of experts system could provide several benefits and enhance the overall capabilities of the model:

  1. Improved Reasoning Capabilities:

    • HLC's higher-order logic and lambda calculus foundations enable more sophisticated reasoning capabilities.
    • The model can handle complex dependencies, abstractions, and quantification, allowing it to perform advanced inference and deduction tasks.
    • This can complement other experts in the mixture that may focus on pattern recognition, data-driven learning, or specialized domain knowledge.
  2. Enhanced Expressiveness:

    • HLC's hypergraph-based representation allows modeling complex structures and relationships that may be difficult to capture with traditional graph-based or vector-based representations.
  • The model can express and reason about intricate domain knowledge, logical rules, and constraints.
@viethung0823
viethung0823 / ptitScript.js
Last active May 17, 2024 04:07
Feature: extract questions, answer keys, auto fill correct answers
function selectElementText(e,t=document){let n=t.querySelector(e),o=document.createRange();o.selectNodeContents(n);let l=window.getSelection();return l.removeAllRanges(),l.addRange(o),window.getSelection().toString().replace(/\n/g," ").trim()}if(window.location.href.includes("mod/quiz/review.php?attempt")){const e=document.querySelectorAll(".que");let t="";Array.from(e).forEach((e=>{const n=selectElementText(".qtext p",e),o=n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,""),l=selectElementText(".rightanswer p",e);t+=`"${o}", "${n}", "${l}"\n`}));const n={data:t};fetch("https://ptit-pool-data.vercel.app/update-sheet",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>e.json())).then((e=>{console.log(e)})).catch((e=>{console.error("Error:",e)})),GM_setClipboard(t)}else if(window.location.href.includes("mod/quiz/attempt.php?attempt")){const e=document.querySelectorAll(".que");let t="";Array.from(e).forEach((async(e,n)=>{const o=e.querySelector(".qtext p"),
@redoPop
redoPop / jquery.loadshiv.js
Created December 10, 2010 05:35
Replacement jQuery.load() for use with innerShiv
// jQuery plugin based on .load() for use with innerShiv
// http://jdbartlett.github.com/innershiv for more info
// $('selector').loadShiv('example.html selector');
jQuery.fn.loadShiv = function (url, params, callback) {
var off, selector, self, type;
if (!this.length || typeof url !== 'string') {
return this;
}
@ruvnet
ruvnet / introduction-to-mixture-of-experts-moe-model-tutorial.ipynb
Last active May 17, 2024 04:06
Introduction to Mixture of Experts (MoE) Model Tutorial
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@redoPop
redoPop / ordered_containable.php
Created April 28, 2011 13:48
CakePHP Behavior that makes ContainableBehavior respect a Model's default order
<?php
/**
* Behavior to enhance CakePHP ContainableBehavior by respecting default Model order
*
* Makes ContainableBehavior respect Model::order when no other order is specified in
* the containment. Must be placed before ContainableBehavior in the actsAs array of
* the Model being queried, like so:
*
* var $actsAs = array('OrderedContainable', 'Containable');
*
import {
RxCrop,
RxDesktop,
RxPencil2,
RxReader,
RxRocket,
RxAccessibility,
} from "react-icons/rx";
import SpaceCity1 from "../assets/SpaceCity1.jpg";
@redoPop
redoPop / extension_specific_route.php
Created May 27, 2011 22:59
CakePHP custom Route class that restricts a route to a single extension.
<?php
/**
* Custom Route class that restricts a route to a single extension.
* Enables you to build controller actions that are only applied to specific
* extensions, e.g., '/posts.json' goes to PostsController::index_json while
* '/posts' goes to PostsController::index.
*
* To use, drop this into app/libs/routes/extension_specific_route.php and add
* the following to the top of app/config/routes.php:
*